<?php
/* @var $this TicketStatusController */
/* @var $model TicketStatus */

$this->breadcrumbs=array(
$model->ticket->ticket_name=>array('ticket/view','id'=>$model->ticket_id),
	$model->id,
);

if ((Yii::app()->user->type==="Admin")) {
$this->menu=array(
        array('label'=>'Manage', 'url'=>array('admin')),
        array('label'=>'List', 'url'=>array('index')),
        array('label'=>'Delete', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
        array('label'=>'Update', 'url'=>array('update', 'id'=>$model->id)),
        array('label'=>'Create', 'url'=>array('create')),
);
}else if((Yii::app()->user->type==="Manager")){
$this->menu=array(
        array('label'=>'Manage', 'url'=>array('admin')),
        array('label'=>'List', 'url'=>array('index')),
        array('label'=>'Update', 'url'=>array('update', 'id'=>$model->id)),
        array('label'=>'Create', 'url'=>array('create')),
        );
}else {
$this->menu=array(
        array('label'=>'Manage', 'url'=>array('admin')),
        array('label'=>'List', 'url'=>array('index')),
        );
        }
?>
<h1 align = left><?php echo $model->status?> </h1>
<h1>View Ticket Status #<?php echo $model->id; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'status',
		'start_date',
		'start_time',
		'stop_date',
		'stop_time',
		'report_date',
		'report_time',
		'current_date',
		'current_time',
		'remarks',
	
		//'ticket_id',
	),
)); ?>

<?php $conf=TicketStatus::model()->findAll('id = :a', array(':a'=>$model->id));?>
<?php if (count($conf) !== 0){?>
<br>
<h2>Ticket Information</h2>
<?php foreach ($conf as $row) { ?>
<?php $this->widget('zii.widgets.CDetailView', array(
	        'data'=>$row,
	        'attributes'=>array(   	
			  
				  array('label'=>'Ticket Name' , 'value'=>$row->ticket->ticket_name),
				    array('label'=>'Description' , 'value'=>$row->ticket->ticket_descript),
					  array('label'=>'Service Type' , 'value'=>$row->ticket->ticket_service_type),
					    array('label'=>'Effective Date' , 'value'=>$row->ticket->effective_date),
  array('label'=>'Demo Duration' , 'value'=>$row->ticket->demo_duration),
    array('label'=>'Recommendation' , 'value'=>$row->ticket->recommendation),
			),
	)); ?>
<br>




<?php }} ?>
